Release 1.9.0: Add RiddlResult[T] ADT#722
Merged
Merged
Conversation
…rning These are semantic correctness issues (handler not producing expected output), not structurally missing elements. A command handler that doesn't send an event or a query handler that doesn't send a result is doing the wrong thing, not missing content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d test Move BastifyCommand and UnbastifyCommand from commands/jvm to commands/shared so they compile for both JVM and Native platforms. Register both commands in the Native CommandLoader and shared Commands.loadCommandNamed. Add round-trip UnbastifyCommandTest. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds cross-platform bast2FlatAST(bytes) to RiddlLib trait, RiddlAPI JS facade (Int8Array input), TypeScript declaration, and a shared round-trip test. Enables ossum.ai Playground to load pre-built BAST files and get a flattened Root for display. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tput - Centralize metadata flag save/restore in readNode() instead of each individual read*Node() method - Add Epic/UseCase subtype byte to disambiguate during read - Use RepositorySchemaKind.fromOrdinal() instead of manual match - Simplify unbastify to emit single flattened .riddl file - Add RiddlModelsRoundTripTest for BAST round-trip validation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces a cross-platform sealed trait RiddlResult[T] with Success[T] and Failure cases. All RiddlLib methods that returned Either[Messages, T] now return RiddlResult[T]. ast2bast changed from Array[Byte] to RiddlResult[Array[Byte]] to surface errors. TypeScript: ParseResult<T> renamed to RiddlResult<T> with deprecated alias for migration. RiddlResult provides map, flatMap, toEither for Scala interop and fromEither for bridging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
scala-steward
pushed a commit
to scala-steward/riddl-1
that referenced
this pull request
Feb 20, 2026
Release 1.9.0: Add RiddlResult[T] ADT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
RiddlResult[T]sealed trait replacingEither[Messages, T]returns in RiddlLibast2bastnow returnsRiddlResult[Array[Byte]]instead of silent empty array on failureParseResult<T>renamed toRiddlResult<T>(deprecated alias kept)Test plan
sbt riddlLib/test— 13/13 JVM tests passsbt riddlLibJS/test— 11/11 JS tests passRiddlResult.Success/Failure🤖 Generated with Claude Code